﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Foundation.ObjectHydrator.Interfaces;

namespace Foundation.ObjectHydrator.Generators
{
    public class AmericanAddressGenerator:IGenerator
    {
        Random random;

        public AmericanAddressGenerator()
        {
            random = new Random();
        }

        public object Generate()
        {
            StringBuilder sb = new StringBuilder();
            int NumericPortion = random.Next(1, 99999);
            sb.Append(NumericPortion.ToString());
            sb.Append(" ");

            string[] streetnamearray = new string[5] { "Surrey", "Broadway", "Park", "Fariview", "Harbor" };
            int max = streetnamearray.Count() - 1;
            sb.Append(streetnamearray[random.Next(0, max)]);
            sb.Append(" ");

            string[] suffix = new string[8] { "Dr.", "Pl.", "St.", "Ave.", "Way", "Lane", "Circle", "Rd." };
            int max2 = suffix.Count() - 1;
            sb.Append(suffix[random.Next(0, max2)]);

            return sb.ToString();
        }
    }
}
